<{include file="header.html"}>

	<div id="form_add" class="one_center">

		<div class="box_two_third">
			<div class="box_head"><{$login->EMAIL}></div>
			<div class="box_content">
			<div class="message">
				<{include file="message.html"}>
			</div>

		<form name="edit" method="post" action="#">

			<table>
				<tr>
					<td>
						<{$smarty.const._LB_NEW_PASSWORD|utf8_escape_html}>&nbsp;:&nbsp;<{$smarty.const._LB_REQUIRE_FIELD}>
					</td>
					<td>
						<input id="PASSWORD" type="password" maxlength="255" size="30" value="" name="PASSWORD"/>
					</td>
				</tr>

				<tr>
					<td>
						<{$smarty.const._LB_REPEAT_PASSWORD|utf8_escape_html}>&nbsp;:&nbsp;<{$smarty.const._LB_REQUIRE_FIELD}>
					</td>
					<td>
						<input id="PASS_CONFIRM" type="password" maxlength="255" size="30" value="" name="PASS_CONFIRM"/>
					</td>
				</tr>

				<tr>
                    <td colspan="2" class="submit" style="padding-top: 5px;">
                            <a class="tribullet" href="<{$backlink}>"><{$smarty.const._LB_BACK}></a>
                            &nbsp;&nbsp;
                            <a class="tribullet" id="submit" href="#" onclick="checkValidForm();"><{$smarty.const._LB_VALIDATE}></a>
					</td>
				</tr>

				<{if isset($errors)}>
				<tr>
					<td>
						<{$errors->display()}>
					</td>
					<td></td>
				</tr>
				<{/if}>
			</table>
			<input type="hidden" value="<{$login->ID}>" name="id" id="id"/>
			<input type="hidden" value="<{$smarty.const.ACT_VALID_EDIT}>" name="act"/>
			</form>
		</div>

		</div>
 </div>

<script type="text/javascript">

function checkValidForm()
	{
		var valid = true;

		var pass = document.getElementById('PASSWORD');
		var confirm = document.getElementById('PASS_CONFIRM');

		var id = document.getElementById('id');

		if(pass.value!=confirm.value)
		{
			showErrorBubble(pass, "<{$smarty.const._LB_REPEAT_NEW_PASSWORD|utf8_escape_html}>" );
			return false;
		}

		if(pass.value=='')
		{
			showErrorBubble(pass, "<{$smarty.const._LB_PASSWORD_IS_EMPTY|utf8_escape_html}>" );
			return false;
		}

		if(!isValidLengthTextBox(pass, <{$smarty.const.MAX_LENGTH_PASSWORD}>, '<{$smarty.const._MSG_PASSWORD_IS_TOO_LONG|utf8_escape_js}>'))
		{
			return false;
		}
		if(!isValidMinLengthTextBox(pass, <{$smarty.const.MIN_LENGTH_PASSWORD}>, '<{$smarty.const._MSG_PASSWORD_IS_TOO_SHORT|utf8_escape_js}>'))
		{
			return false;
		}

				document.edit.submit();
	}

</script>

<{include file="footer.html"}>
